<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app">
    <el-table
            :data="logs"
            border
            stripe
            style="width: 100%">
        <el-table-column width = 50px
                label="任务标识"
                prop="id">
        </el-table-column>
        <el-table-column
                label="任务名称"
                prop="jobname">
        </el-table-column>
        <el-table-column width = 110px
                label="时间"
                prop="date">
        </el-table-column>
        <el-table-column width = 100px
                label="执行结果"
                prop="status">
        </el-table-column>
        <el-table-column width = 800px
                label="执行信息"
                prop="message">
        </el-table-column>
        <el-table-column
                label="备注1"
                prop="ext01">
        </el-table-column>
        <el-table-column
                label="备注2"
                prop="ext02">
        </el-table-column>
        </el-table-column>
    </el-table>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
    new Vue({
        el: '#app',
        created(){
            let there = this;
            axios({
                method: 'get',
                url: '/logs/findAll'
            }).then(function (res) {
                there.logs = res.data.data.logs;
               console.log(res);
            }).catch(function (err) {
                    console.log(err);
                });
        },
        mounted(){
            //this.timer = setInterval(this.fleshList, 1000);
        },
        beforeDestroy() {
            clearInterval(this.timer);
        },
        data() {
            return {
                logs: [],
                search: '',
                FormData:{},
                showForm:false,
                timer:''
            }
        },
        methods: {

            fleshList(){
                let there = this;
                axios({
                    method: 'get',
                    url: '/logs/findAll'
                }).then(function (res) {
                    there.logs = res.data.data.logs;
                    console.log(there.logs);
                }).catch(function (err) {
                    console.log(err);
                });
            }
        },
    })
</script>
</html>